/* 轮播图详情页样式 */

/* 通用样式 */
:root {
    --primary-color: #5b6bea;
    --primary-light: #eef1ff;
    --primary-dark: #4a59d4;
    --text-color: #333;
    --text-secondary: #666;
    --text-light: #999;
    --background-color: #f8f9fc;
    --card-background: #fff;
    --border-color: #eee;
    --header-height: 56px;
    --bottom-actions-height: 60px;
}

body {
    background-color: var(--background-color);
    margin: 0;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--text-color);
}

.app-container {
    max-width: 100%;
    margin: 0 auto;
    position: relative;
    min-height: 100vh;
}

/* 头部样式 */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    background-color: transparent;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 16px;
    z-index: 100;
    color: white;
    transition: background-color 0.3s ease;
}

.header.scrolled {
    background-color: var(--card-background);
    color: var(--text-color);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.back-button, .share-button {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    background-color: rgba(0, 0, 0, 0.2);
    transition: background-color 0.3s ease;
}

.header.scrolled .back-button,
.header.scrolled .share-button {
    background-color: rgba(0, 0, 0, 0.05);
}

.back-button:hover, .share-button:hover {
    background-color: rgba(0, 0, 0, 0.3);
}

.header.scrolled .back-button:hover,
.header.scrolled .share-button:hover {
    background-color: rgba(0, 0, 0, 0.1);
}

.page-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

/* 主内容区 */
.main-content {
    padding-bottom: var(--bottom-actions-height);
}

/* 顶部banner图 */
.banner {
    position: relative;
    height: 240px;
    overflow: hidden;
}

.banner-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.1), rgba(0, 0, 0, 0.6));
}

/* 详情内容区 */
.detail-content {
    background-color: var(--card-background);
    border-radius: 20px 20px 0 0;
    margin-top: -20px;
    position: relative;
    padding: 24px 16px;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
}

.detail-header {
    margin-bottom: 20px;
}

.detail-title {
    font-size: 24px;
    font-weight: 700;
    margin: 0 0 12px 0;
    line-height: 1.3;
}

.detail-meta {
    display: flex;
    justify-content: space-between;
    color: var(--text-light);
    font-size: 14px;
}

.detail-description {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.content-sections {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.content-section {
    background-color: var(--background-color);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 12px 0;
    color: var(--primary-color);
}

.section-content {
    font-size: 15px;
    line-height: 1.6;
    color: var(--text-secondary);
}

.section-content p {
    margin: 0 0 12px 0;
}

.section-content p:last-child {
    margin-bottom: 0;
}

/* 相关推荐区域 */
.related-section {
    padding: 24px 16px;
    background-color: var(--background-color);
}

.related-title {
    font-size: 18px;
    font-weight: 600;
    margin: 0 0 16px 0;
}

.related-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.related-item {
    display: flex;
    background-color: var(--card-background);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.related-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.related-img {
    flex: 0 0 100px;
    height: 80px;
}

.related-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.related-content {
    flex: 1;
    padding: 12px;
    display: flex;
    flex-direction: column;
}

.related-content h3 {
    font-size: 15px;
    font-weight: 500;
    margin: 0 0 6px 0;
    line-height: 1.4;
}

.related-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
    color: var(--text-light);
    margin-top: auto;
}

/* 底部操作区 */
.bottom-actions {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--bottom-actions-height);
    background-color: var(--card-background);
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-top: 1px solid var(--border-color);
    z-index: 90;
}

.action-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 12px;
    cursor: pointer;
    padding: 0 16px;
    flex: 0 0 auto;
}

.action-button i {
    font-size: 20px;
    margin-bottom: 4px;
}

.action-button.active {
    color: var(--primary-color);
}

.primary-button {
    flex: 1;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 30px;
    height: 40px;
    margin-left: 16px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-button:hover {
    background-color: var(--primary-dark);
}

/* 评论面板 */
.comment-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    height: 80%;
    background-color: var(--card-background);
    border-radius: 20px 20px 0 0;
    z-index: 100;
    transition: bottom 0.3s ease;
    display: flex;
    flex-direction: column;
}

.comment-panel.show {
    bottom: 0;
}

.comment-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.close-comments {
    margin-right: 16px;
    cursor: pointer;
}

.comment-header h3 {
    flex: 1;
    margin: 0;
    font-size: 16px;
}

.comments-container {
    flex: 1;
    overflow-y: auto;
    padding: 16px;
}

.comment-input-area {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-top: 1px solid var(--border-color);
}

.comment-input {
    flex: 1;
    height: 40px;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 0 16px;
    font-size: 14px;
    outline: none;
}

.send-comment {
    margin-left: 12px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 0 16px;
    height: 40px;
    font-size: 14px;
    cursor: pointer;
}

/* 分享面板 */
.share-panel {
    position: fixed;
    bottom: -100%;
    left: 0;
    right: 0;
    background-color: var(--card-background);
    border-radius: 20px 20px 0 0;
    z-index: 100;
    transition: bottom 0.3s ease;
}

.share-panel.show {
    bottom: 0;
}

.share-header {
    display: flex;
    align-items: center;
    padding: 16px;
    border-bottom: 1px solid var(--border-color);
}

.close-share {
    margin-right: 16px;
    cursor: pointer;
}

.share-header h3 {
    flex: 1;
    margin: 0;
    font-size: 16px;
}

.share-options {
    display: flex;
    justify-content: space-around;
    padding: 24px 16px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.share-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 8px;
    color: white;
}

.wechat {
    background-color: #09BB07;
}

.weibo {
    background-color: #E6162D;
}

.qq {
    background-color: #12B7F5;
}

.link {
    background-color: #5b6bea;
}

.share-option span {
    font-size: 12px;
    color: var(--text-secondary);
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 95;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.show {
    opacity: 1;
    visibility: visible;
}

/* 底部导航 */
.tab-bar {
    display: none;
}

/* 适配不同屏幕尺寸 */
@media (max-width: 390px) {
    .detail-title {
        font-size: 22px;
    }

    .banner {
        height: 220px;
    }
}

/* 深色模式适配 */
@media (prefers-color-scheme: dark) {
    :root {
        --text-color: #e0e0e0;
        --text-secondary: #b0b0b0;
        --text-light: #808080;
        --background-color: #121212;
        --card-background: #1e1e1e;
        --border-color: #333;
    }

    .header.scrolled {
        background-color: var(--card-background);
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
    }

    .back-button, .share-button {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .header.scrolled .back-button,
    .header.scrolled .share-button {
        background-color: rgba(255, 255, 255, 0.05);
    }

    .back-button:hover, .share-button:hover {
        background-color: rgba(255, 255, 255, 0.2);
    }

    .header.scrolled .back-button:hover,
    .header.scrolled .share-button:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .comment-input {
        background-color: var(--background-color);
        border-color: var(--border-color);
        color: var(--text-color);
    }
} 